#define _CRT_SECURE_NO_WARNINGS 1


#include<stdio.h>
#include<stdbool.h>

typedef struct ListNode
{
	int data;
	struct ListNode* next;
} ListNode;

bool CircularList(ListNode* phead)
{
	ListNode* slow, * fast;
	slow = fast = phead;
	while (fast != NULL && fast->next != NULL)
	{
		slow = slow->next;
		fast = fast->next->next;
		if (slow == fast)
		{
			return true;
		}
	}
	return false;
}